<template>
  <Tabbar>
    <tabbar-item path="/home" active-color="blue">
      <img slot="item-icon" src="~assets/img/tabbar/home.svg" alt="">
      <img slot="item-icon-active" src="~assets/img/tabbar/home_active.svg" alt="">
      <div slot="item-text">首页</div>
    </tabbar-item>
    <tabbar-item path="/category" active-color="blue">
      <img slot="item-icon" src="~assets/img/tabbar/category.svg" alt="">
      <img slot="item-icon-active" src="~assets/img/tabbar/category_active.svg" alt="">
      <div slot="item-text">分类</div>
    </tabbar-item>
    <tabbar-item path="/shoppingcart" active-color="blue">
      <img slot="item-icon" src="~assets/img/tabbar/cart.svg" alt="">
      <img slot="item-icon-active" src="~assets/img/tabbar/cart_active.svg" alt="">
      <div slot="item-text">购物车</div>
    </tabbar-item>
    <tabbar-item path="/profile" active-color="blue">
      <img slot="item-icon" src="~assets/img/tabbar/profile.svg" alt="">
      <img slot="item-icon-active" src="~assets/img/tabbar/profile_active.svg" alt="">
      <div slot="item-text">我的</div>
    </tabbar-item>
  </Tabbar>
</template>

<script>
  import Tabbar from "components/common/tabbar/TabBar"
  import TabbarItem from "components/common/tabbar/TabBarItem"

  export default {
    name: "MainTabbar",
    components: {
      Tabbar,
      TabbarItem
    }
  }
</script>

<style scoped>
  body {
    margin: 0;
    padding: 0;
  }

  #tab-bar {
    display: flex;
    background-color: #f6f6f6;
    height: 49px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .tab-bar-item {
    flex: 1;
    text-align: center;
  }

  .tab-bar-item img {
    vertical-align: center;
    width: 20px;
  }
</style>
